package com.springboot.study.service;

import com.springboot.study.tests.User;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpServletRequest;

/**
 * @Author: guodong
 * @Date: 2021/6/29 16:09
 * @Version: 1.0
 * @Description:
 */
@Service
@Scope(value = "prototype")
public class BusinessService {

    private final Logger logger = LoggerFactory.getLogger(this.getClass());

    public User getIpInfo(HttpServletRequest request, int type) {
        logger.info("进入getIpInfo方法。");
        User user = new User();
        user.setId(request.getContentLengthLong());
        return user;
    }

    public Integer getTestInfo(int type) {
        logger.info("进入getTestInfo方法。");
        return type;
    }

}
